MentionEditText

open class MentionEditText : AppCompatEditText

EditText with Mention feature. This EditText detects the trigger keyword and show a list of suggested users for mention. Plus, If the suggested user is selected, the selected user will be markup as mentioned-text and created as a mention data. since 3.0.0

Constructors

Link copied to clipboard
open fun MentionEditText(@NonNull context: Context)
Link copied to clipboard
open fun MentionEditText(@NonNull context: Context, @Nullable attrs: AttributeSet)
Link copied to clipboard
open fun MentionEditText(    @NonNull context: Context,     @Nullable attrs: AttributeSet,     defStyleAttr: Int)

Functions

Link copied to clipboard
open fun applyTextUIConfig(@NonNull textUIConfig: TextUIConfig)
Link copied to clipboard
open fun bindUserMention(    @NonNull config: UserMentionConfig,     @NonNull mentionUIConfig: TextUIConfig,     @NonNull handler: OnMentionEventListener)
Binds the configuration for mention and the callback for mention to this EditText.
Link copied to clipboard
open fun getMentionedTemplate(): CharSequence
Returns the mentioned-template text on this EditText.
Link copied to clipboard
open fun getMentionedUsers(): List<User>
Returns the list of mentioned-users on this EditText.
Link copied to clipboard
open fun getMentionSpanAtOffset(index: Int): MentionSpan
Return the MentionSpan to which the character at index belongs
Link copied to clipboard
open fun notifySuggestedMentionDataChanged(@NonNull suggestedMentionList: List<User>)
Notifies change of a list of suggested user for mention.
Link copied to clipboard
protected open fun onAttachedToWindow()
Link copied to clipboard
open fun onCreateInputConnection(@NonNull outAttrs: EditorInfo): InputConnection
Link copied to clipboard
protected open fun onDetachedFromWindow()
Link copied to clipboard
open fun onKeyDown(keyCode: Int, @NonNull event: KeyEvent): Boolean
Link copied to clipboard
protected open fun onSelectionChanged(selStart: Int, selEnd: Int)
Link copied to clipboard
open fun setSuggestedMentionListAdapter(@NonNull adapter: MutableBaseAdapter<User>)
Sets the adapter to be used to a suggested mention popup dialog when the trigger is detected.
Link copied to clipboard
open fun setUseSuggestedMentionListDivider(useDivider: Boolean)
Sets whether to use divider for a suggested mention popup dialog when the trigger is detected.